const koaRouter = require('@koa/router')
const { verifAuth } = require('../middleware/login.middleware')
const { hanleAvatar } = require('../middleware/file.middleware')
const fileController = require('../controller/file.controller')

const fileRouter = new koaRouter({ prefix: '/file' })
// 定义中间件

fileRouter.post('/avatar', verifAuth, hanleAvatar, fileController.created)
module.exports = fileRouter